package com.gmq.mianshi.designModel;

/**
 * @author gmq
 * @email 2628931@qq.com
 * @date 2017/11/27 15:58
 */
public class TestHashCode {

    public static void main(String[] args) {
        Integer a =11;
        Integer b = 11;
        System.out.println("a.hashCode: " + a.hashCode());
        System.out.println("b.hashCode: " + b.hashCode());
        System.out.println(b.hashCode()==a.hashCode());

        String aa ="cx";
        String bb = "cx";
        System.out.println("aa.hashCode: " + aa.hashCode());
        System.out.println("bb.hashCode: " + bb.hashCode());
        System.out.println(aa.hashCode()==bb.hashCode());
    }
}
